from app.apis.pay_api import pay_bp
from app.apis.login_api import login_bp
from app.apis.user_api import user_bp
from app.apis.system_api import system_bp
from app.api.v1.admin import admin_blueprint
from app.apis.recognition_api import recognition_bp
from app.apis.wxgzh import wxgzh_bp
from app.apis.upload_api import upload_bp
from app.apis.wx_api import wx_db
from app.api.v1.admin.mp import init_app as init_mp_api


def register_blueprints(app):
    app.register_blueprint(pay_bp, url_prefix='/api')
    app.register_blueprint(login_bp, url_prefix='/api')
    app.register_blueprint(user_bp, url_prefix='/api/user')
    app.register_blueprint(system_bp, url_prefix='/api')
    app.register_blueprint(recognition_bp, url_prefix='/api')
    app.register_blueprint(admin_blueprint)
    app.register_blueprint(upload_bp)
    app.register_blueprint(wx_db)
    init_mp_api(app)
    app.register_blueprint(wxgzh_bp, url_prefix='/api/wxgzh')


def initialize_services(app):
    from app.apis.wxgzh import init_app as init_wxgzh_api
    init_wxgzh_api(app)
